<template>
  <div class="like">
    <Card>
      <span>猜你喜欢</span>
    </Card>
    <ul>
      <li v-for="item in likeList" :key="item.id">
        <h2><img :src="item.imgUrl" alt="" /></h2>
        <h3>{{ item.names }}</h3>
        <div>
          <span>￥</span>
          <b>{{ item.price }}</b>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import Card from "@/components/home/Card.vue";
export default {
  name: "Like",
  props:['likeList'],
  components: {
    Card,
  },
};
</script>

<style scoped lang="scss">
.like ul {
  display: flex;
  flex-wrap: wrap;
  li {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50%;
    > div {
      width: 100%;
      text-align: left;
      color: #FF0000;
      span {
        font-size: 0.32rem;
      }
      b{
        font-weight: 600;
        font-size: .426667rem;
      }
    }
  }
}
.like h3 {
  padding: 0 0.16rem;
  width: 93%;
  font-size: 0.373333rem;
  font-weight: 400;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.like img {
  width: 4.693333rem;
  height: 4.693333rem;
}
</style>